//
//  CHLGshooterCell.m
//  BallRankingProject
//
//  Created by lanou3g on 15/6/2.
//  Copyright (c) 2015年 luojian. All rights reserved.
//

#import "CHLGshooterCell.h"

@implementation CHLGshooterCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self getMessage];
        
    }
    return self;
}

- (void)getMessage
{
    CGRect fram=[UIScreen mainScreen].bounds;
    fram.size.height=60;
    self.frame=fram;
    
    self.numberLable=[[UILabel alloc] initWithFrame:CGRectMake(10,(CGRectGetHeight(self.frame)-CGRectGetWidth(self.frame)/10)/2, CGRectGetWidth(self.frame)/10, CGRectGetWidth(self.frame)/10)];
    //设置圆角
    self.numberLable.backgroundColor=[UIColor colorWithRed:0.517 green:0.558 blue:0.910 alpha:1.000];
    self.numberLable.layer.cornerRadius = self.numberLable.bounds.size.width/2;
    self.numberLable.layer.masksToBounds = YES;
    
    self.headiconImageview=[[UIImageView alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame)/6, 5, CGRectGetWidth(self.frame)/6, CGRectGetHeight(self.frame)-10)];
    self.nameLable=[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame)/6*2, 0,CGRectGetWidth(self.frame)/6, CGRectGetHeight(self.frame))];
    self.teamLable=[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame)/6*3, 0,CGRectGetWidth(self.frame)/6*2, CGRectGetHeight(self.frame))];
    self.ballcountLable=[[UILabel alloc] initWithFrame:CGRectMake(CGRectGetWidth(self.frame)/6*5, 0,CGRectGetWidth(self.frame)/6, CGRectGetHeight(self.frame))];
    
//    _numberLable.backgroundColor=[UIColor redColor];
//    _nameLable.backgroundColor=[UIColor yellowColor];
//    _teamLable.backgroundColor=[UIColor blueColor];
//    _ballcountLable.backgroundColor=[UIColor redColor];
    [self.contentView addSubview:_numberLable];
    [self.contentView addSubview:_headiconImageview];
    [self.contentView addSubview:_nameLable];
    [self.contentView addSubview:_ballcountLable];
    [self.contentView addSubview:_teamLable];
    _numberLable.textAlignment=1;
     _nameLable.textAlignment=1;
     _ballcountLable.textAlignment=1;
    _teamLable.textAlignment=1;
   // _numberLable.font=[UIFont systemFontOfSize:10.0];
    _nameLable.font=[UIFont systemFontOfSize:12.0];
   // _ballcountLable.font=[UIFont systemFontOfSize:10.0];
    _teamLable.font=[UIFont systemFontOfSize:12.0];
    _nameLable.numberOfLines=0;
    self.backgroundColor=[UIColor whiteColor];
    //self.backgroundColor=[UIColor colorWithRed:1.000 green:0.430 blue:0.569 alpha:1.000];
}


@end
